Skip to content

feat(learnings): implement learn suggest subcommand#715

Merged
AlexMikhalev merged 1 commit intomainfrom
task/83-learn-suggest
Mar 26, 2026
Merged

feat(learnings): implement learn suggest subcommand#715
AlexMikhalev merged 1 commit intomainfrom
task/83-learn-suggest

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

  • Implements terraphim-agent learn suggest <context> subcommand (Gitea add dist folder #83)
  • Adds suggest_learnings() function that queries existing learnings using keyword matching and ranks by relevance
  • Returns top-N suggestions (default 5, configurable via --limit)

Fixes #83

Test plan

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Manual test: terraphim-agent learn suggest "rust error handling" returns relevant learnings

Generated by kimi-for-coding/k2p5 agent on bigbox

- Add suggest_learnings() function with keyword-based relevance scoring
- Add ScoredEntry struct with format_suggestion() helper method
- Add learn suggest CLI subcommand with --limit flag (default 5)
- Support --global flag to query global learnings
- Re-export LearningEntry and ScoredEntry from learnings module
- Output format: numbered list with ID, type, score, and summary
- All quality checks pass: cargo fmt, cargo clippy -D warnings, cargo test
@AlexMikhalev AlexMikhalev merged commit fa10b57 into main Mar 26, 2026
11 of 12 checks passed
@AlexMikhalev AlexMikhalev deleted the task/83-learn-suggest branch March 26, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant